<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <title></title>
</head>

<body>
    <div id="box">
        <button @click="btn()" ref="box">{{str}}</button>
    </div>
</body>
<script type="text/javascript">
    const { createApp } = Vue;
    const app = createApp({
        el: '#box',
        data() {
            return {
                str: '123'
            }
        },
        methods: {
            btn() {
                this.str = 'bbb'
                console.log(this.$refs.box.innerHTML);
                this.$nextTick(() => {
                    console.log(this.$refs.box.innerHTML, 'xxxx');
                })
            }
        },

    })
    app.mount('#box')
</script>

</html>